﻿<%@ Page Language="C#"  Inherits="System.Web.Mvc.ViewPage<JumJob.Models.RegisterModel>" %>
<%if (ViewData["exito"] == null)
  { %>
    <div id="RegisterDialog">
        <h2>
            Crea una nueva cuenta</h2>
        <p>
            Usa el formulario para registrarte
        </p>
        <p>
            El tamano minimo de tus password es
            <%: ViewData["PasswordLength"]%>
            caracteres
        </p>
         <img id="imgLogOnLoading" src="../../Content/img/ajax-loader.gif" alt="Cargando..." style="display:none" />
        <% using (Html.BeginForm())
           { %>
        <%: Html.ValidationSummary(true, "No se pudo crear tu cuenta, por favor corrige los errores e intenta de nuevo.")%>
        <div>
            <fieldset>
                <legend>Informacion de la cuenta</legend>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.UserName)%>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.UserName)%>
                    <%: Html.ValidationMessageFor(m => m.UserName)%>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Email)%>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Email)%>
                    <%: Html.ValidationMessageFor(m => m.Email)%>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Password)%>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.Password)%>
                    <%: Html.ValidationMessageFor(m => m.Password)%>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.ConfirmPassword)%>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.ConfirmPassword)%>
                    <%: Html.ValidationMessageFor(m => m.ConfirmPassword)%>
                </div>
                <p>
                    <input id="btnRegister" type="button" value="Registrar" />
                </p>
            </fieldset>
        </div>
        <% } %>
    </div>
<%}
  else {
      Response.Write("<div>" + ViewData["ReturnUrl"].ToString() + "</div>");
      } %>
